﻿Jxstar.currentPage = function() {
	var config = {param:{},initpage:function(page, define){},eventcfg:{}};
	
	var purtypeData = Jxstar.findComboData('purtype');
	var auditData = Jxstar.findComboData('audit');
	var moneytypeData = Jxstar.findComboData('moneytype');
	var httypeData = Jxstar.findComboData('httype');
	var items = [{
		width:'97%',
		border:false,
		layout:'form',
		autoHeight:true,
		xtype:'container',
		style:'padding:5 10 5 10;',
		items:[{
			anchor:'100%',
			border:false,
			xtype:'container',
			layout:'column',
			autoHeight:true,
			items:[{
				border:false,
				xtype:'container',
				columnWidth:0.495,
				layout:'form',
				style: 'padding-left:10px;',
				items:[
					{xtype:'trigger', fieldLabel:'项目编号', name:'contract_say__project_code',
						anchor:'100%', triggerClass:'x-form-search-trigger',
						maxLength:20, allowBlank:false, labelStyle:'color:#0000FF;', labelSeparator:'*', editable:false,
						onTriggerClick: function() {
							var selcfg = {pageType:'combogrid', nodeId:'project_select', layoutPage:'', sourceField:';', targetField:';', whereSql:"project_status = '2' and projbao_type <>'2'", whereValue:'', whereType:'', isSame:'1', isShowData:'1', isMoreSelect:'0',isReadonly:'1',queryField:'',likeType:'',fieldName:'contract_say.project_code'};
							JxSelect.createSelectWin(selcfg, this, 'node_contract_say_form');
						}},
					{xtype:'textfield', fieldLabel:'项目名称', name:'contract_say__project_name', readOnly:true, anchor:'100%', maxLength:100},
					{xtype:'textfield', fieldLabel:'合同名称', name:'contract_say__contract_name', allowBlank:false, labelStyle:'color:#0000FF;', labelSeparator:'*', anchor:'100%', maxLength:100},
					{xtype:'textfield', fieldLabel:'合同签订部门', name:'contract_say__done_deptname', readOnly:true, anchor:'100%', maxLength:50},
					{xtype:'textfield', fieldLabel:'公司参加谈判人员', name:'contract_say__sayperson_gs', anchor:'100%', maxLength:50},
					{xtype:'datefield', fieldLabel:'谈判时间', name:'contract_say__say_date', defaultval:'fun_getToday()', format:'Y-m-d', anchor:'100%'},
					{xtype:'textfield', fieldLabel:'谈判地点', name:'contract_say__say_address', anchor:'100%', maxLength:50},
					{xtype:'combo', fieldLabel:'采购方式', name:'contract_say__pur_type',
						anchor:'100%', readOnly:true, editable:false, allowBlank:false, labelStyle:'color:#0000FF;', labelSeparator:'*',
						store: new Ext.data.SimpleStore({
							fields:['value','text'],
							data: purtypeData
						}),
						emptyText: jx.star.select,
						mode: 'local',
						triggerAction: 'all',
						valueField: 'value',
						displayField: 'text',
						value: purtypeData[0][0]},
					{xtype:'textfield', fieldLabel:'项目负责人', name:'contract_say__project_user', readOnly:true, anchor:'100%', maxLength:20},
					{xtype:'hidden', fieldLabel:'主键', name:'contract_say__say_id', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'实施单位ID', name:'contract_say__dept_id', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'授权形式', name:'contract_say__auth_type', anchor:'100%'}
				]
			},{
				border:false,
				xtype:'container',
				columnWidth:0.495,
				layout:'form',
				style: 'padding-left:10px;',
				items:[
					{xtype:'combo', fieldLabel:'记录状态', name:'contract_say__auditing', defaultval:'0',
						anchor:'100%', readOnly:true, editable:false,
						store: new Ext.data.SimpleStore({
							fields:['value','text'],
							data: auditData
						}),
						emptyText: jx.star.select,
						mode: 'local',
						triggerAction: 'all',
						valueField: 'value',
						displayField: 'text',
						value: auditData[0][0]},
					{xtype:'combo', fieldLabel:'项目类别', name:'contract_say__money_type',
						anchor:'100%', readOnly:true, editable:false,
						store: new Ext.data.SimpleStore({
							fields:['value','text'],
							data: moneytypeData
						}),
						emptyText: jx.star.select,
						mode: 'local',
						triggerAction: 'all',
						valueField: 'value',
						displayField: 'text',
						value: moneytypeData[0][0]},
					{xtype:'numberfield', decimalPrecision:6, fieldLabel:'项目概算(万元)', name:'contract_say__project_money', readOnly:true, anchor:'100%', maxLength:12},
					{xtype:'trigger', fieldLabel:'对方签约单位', name:'contract_say__provider_name',
						anchor:'100%', triggerClass:'x-form-search-trigger',
						maxLength:50, allowBlank:false, labelStyle:'color:#0000FF;', labelSeparator:'*', editable:false,
						onTriggerClick: function() {
							var selcfg = {pageType:'combogrid', nodeId:'provider_select', layoutPage:'', sourceField:'provider.provider_name;provider_id', targetField:'contract_say.provider_name;provider_id', whereSql:"manage_status = '20'", whereValue:'', whereType:'', isSame:'0', isShowData:'1', isMoreSelect:'0',isReadonly:'1',queryField:'',likeType:'',fieldName:'contract_say.provider_name'};
							JxSelect.createSelectWin(selcfg, this, 'node_contract_say_form');
						}},
					{xtype:'textfield', fieldLabel:'对方参加谈判人员', name:'contract_say__sayperson_dw', anchor:'100%', maxLength:50},
					{xtype:'textfield', fieldLabel:'实施单位', name:'contract_say__dept_name', readOnly:true, anchor:'100%', maxLength:50},
					{xtype:'textfield', fieldLabel:'谈判单号', name:'contract_say__say_code', readOnly:true, anchor:'100%', maxLength:20},
					{xtype:'numberfield', decimalPrecision:6, fieldLabel:'谈判结果金额(万元)', name:'contract_say__bid_money', defaultval:'0', allowBlank:false, labelStyle:'color:#0000FF;', labelSeparator:'*', anchor:'100%', maxLength:12},
					{xtype:'combo', fieldLabel:'合同类型', name:'contract_say__contract_type', defaultval:'0',
						anchor:'100%', editable:false, allowBlank:false, labelStyle:'color:#0000FF;', labelSeparator:'*',
						store: new Ext.data.SimpleStore({
							fields:['value','text'],
							data: httypeData
						}),
						emptyText: jx.star.select,
						mode: 'local',
						triggerAction: 'all',
						valueField: 'value',
						displayField: 'text',
						value: httypeData[0][0]},
					{xtype:'hidden', fieldLabel:'项目负责人ID', name:'contract_say__project_userid', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'项目ID', name:'contract_say__project_id', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'合同签订部门ID', name:'contract_say__done_deptid', anchor:'100%'}
				]
			}
			]
		},{
			anchor:'100%',
			border:false,
			xtype:'container',
			layout:'column',
			autoHeight:true,
			items:[{
				border:false,
				xtype:'container',
				columnWidth:0.99,
				layout:'form',
				style: 'padding-left:10px;',
				items:[
					{xtype:'fileuploadfield', fieldLabel:'谈判记录表', name:'contract_say__say_file', allowBlank:false, labelStyle:'color:#0000FF;', labelSeparator:'*', readOnly:true, anchor:'100%'},
					{xtype:'checkbox', fieldLabel:'谈判人员是否签名', name:'contract_say__is_qm', defaultval:'0', disabled:false, anchor:'100%'},
					{xtype:'textarea', fieldLabel:'谈判情况记录', name:'contract_say__say_content', allowBlank:false, labelStyle:'color:#0000FF;', labelSeparator:'*', width:'100%', height:120, maxLength:4000},
					{xtype:'textarea', fieldLabel:'谈判结论', name:'contract_say__say_result', allowBlank:false, labelStyle:'color:#0000FF;', labelSeparator:'*', width:'100%', height:48, maxLength:500},
					{xtype:'textarea', fieldLabel:'备注', name:'contract_say__comments', width:'100%', height:48, maxLength:200}
				]
			}
			]
		}]
	}];
	
	config.param = {
		items: items,
		funid: 'contract_say'
	};

	
	
	
	return new Jxstar.FormNode(config);
}